<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>网站配置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__ADMIN__/css/amazeui.min.css" />
    <link rel="stylesheet" href="__ADMIN__/css/app.css">
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css" media="all">
</head>
<body>

<div style="background: #e9ecf3" class="theme-white">
    <div class="row-content am-cf">
        <div class="row">
            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12" style="background: white">
                <div class="widget am-cf">
                    <div class="widget-body  am-fr">
                        <form class="layui-form" action="" style="padding: 10px">
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                                <ul class="layui-tab-title">
                                    <li class="layui-this">网站设置</li>
                                    <li>基本设置</li>
                                    <li>cms设置</li>
                                    <li>seo设置</li>
                                    <li>上传设置</li>
                                    <li>登录设置</li>
                                    <li>水印设置</li>
                                </ul>
                                <div class="layui-tab-content">
                                    <div class="layui-tab-item layui-show">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 120px">网站名称</label>
                                            <div class="layui-input-inline" style="margin-left: 0;width: 400px">
                                                <input type="text" name="web_title" required  lay-verify="required" autocomplete="off" class="layui-input">
                                            </div>
                                            <div class="layui-form-mid layui-word-aux">品牌词</div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 120px">网站LOGO</label>
                                            <div class="layui-input-block" style="margin-left: 0;">
                                                <img src="/static/common/images/avatar/0.jpg" width="40px" height="40px"/>
                                                <div class="layui-btn-group" style="margin-left: 50px">
                                                    <button type="button" class="layui-btn layui-btn-sm">上传图片</button>
                                                    <button type="button" class="layui-btn layui-btn-sm">选择图片</button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 120px">网站域名</label>
                                            <div class="layui-input-inline" style="margin-left: 0;width: 400px">
                                                <input type="text" name="web_host" required  lay-verify="required" autocomplete="off" class="layui-input" placeholder="http://">
                                            </div>
                                            <div class="layui-form-mid layui-word-aux">引用变量：web_host</div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 120px">网站版权信息</label>
                                            <div class="layui-input-inline" style="margin-left: 0;width: 400px">
                                                <input type="text" name="web_copyright" required  lay-verify="required" autocomplete="off" class="layui-input" placeholder="Copyright © 2020 Powered by XCMS">
                                            </div>
                                            <div class="layui-form-mid layui-word-aux">引用变量：web_copyright</div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 120px">ICP备案号</label>
                                            <div class="layui-input-inline" style="margin-left: 0;width: 400px">
                                                <input type="text" name="web_icp" required  lay-verify="required" autocomplete="off" class="layui-input">
                                            </div>
                                            <div class="layui-form-mid layui-word-aux">引用变量：web_icp</div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 120px">地址</label>
                                            <div class="layui-input-inline" style="margin-left: 0;width: 400px">
                                                <input type="text" name="web_address" required  lay-verify="required" autocomplete="off" class="layui-input">
                                            </div>
                                            <div class="layui-form-mid layui-word-aux">引用变量：web_address</div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label" style="width: 120px">手机</label>
                                            <div class="layui-input-inline" style="margin-left: 0;width: 400px">
                                                <input type="text" name="web_phone" required  lay-verify="required" autocomplete="off" class="layui-input">
                                            </div>
                                            <div class="layui-form-mid layui-word-aux">引用变量：web_phone</div>
                                        </div>

                                    </div>
                                    <div class="layui-tab-item">2</div>
                                    <div class="layui-tab-item">3</div>
                                    <div class="layui-tab-item">4</div>
                                    <div class="layui-tab-item">5</div>
                                    <div class="layui-tab-item">6</div>
                                    <div class="layui-tab-item">6</div>
                                </div>
                            </div>

                            <div class="layui-form-item" style="margin-top: 40px;margin-left: 180px">
                                <div class="layui-input-block">
                                    <button type="button" class="am-btn am-btn-success am-btn-sm" lay-submit lay-filter="subForm">立即提交</button>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="__STATIC__/layui/layui.js"></script>
<script>
    layui.config({
        base: '/static/admin/' //静态资源所在路径
    }).use(['form', 'layer', 'element'], function(){

        var layer = layui.layer
            ,form = layui.form
            , element = layui.element;

        form.on('submit(component-form-element)', function(data){

            $.post("{:url('node/add')}", data.field, function (res) {

                if(0 == res.code) {

                    layer.msg(res.msg);
                    setTimeout(function () {

                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                        window.parent.renderTable();
                    }, 200);
                } else {
                    layTool.alert(res.msg, '友情提示', 2);
                }
            }, 'json');
            return false;
        });
    });
</script>
</body>
</html>